/**
 * Created by zhouby on 2018/4/17/017.
 */

const systemConfig_development = {
    axiosUrl: "https://easy-mock.com/mock/5b767a26256d235b2a56f182",
    //开发环境没项目名
    projectName: '/crcc_admin',
};
const systemConfig_production_test = {
    axiosUrl: "http://192.168.1.245:8080/monySide/json",
    //开发环境没项目名
    projectName: '/crcc',
};
const getSystemConfig = () => {
    if (process.env.SYS_ENV === 'development') {
        return systemConfig_development;
    }
    if (process.env.SYS_ENV === 'production') {
        return systemConfig_production_test;
    }
}
const configs = {
    ...getSystemConfig()
};
const systemConfigPath = {
    axiosUrl: (url) => {
        return configs.axiosUrl + url;
    }
}
/*
 * 判断当前环境
 */
const isProduction = () => {
    return process.env.NODE_ENV === 'production';
}

module.exports={configs, systemConfigPath, isProduction};
